import React, {Component} from 'react';
import {ThemesContext} from "./ButtonContext";

class ThemeButton extends Component {
    render() {
        const props = this.props
        const context = this.context;
        return (
            <button {...props}  style={{backgroundColor: context}} >
                点击
            </button>
        );
    }
}

  ThemeButton.contextType = ThemesContext

export default ThemeButton;